/**
 * @purpose 批量插入数据到数据库服务接口
 * @author daizs
 * @created Feb 9, 2010
 */
package platform.common.service;

import platform.common.bo.IIdentifiableObj;
import platform.common.exception.BusinessException;

public interface IBatchAddService {

	/**
	 * 插入一个业务对象到数据库的
	 *
	 * @param bo 插入到数据库的业务对象
	 * @throws BusinessException
	 */
	public abstract void insertIntoDB(IIdentifiableObj bo) throws BusinessException;

	/**
	 * 提交事务并关闭数据库连接Session
	 *
	 * @throws BusinessException
	 */
	public abstract void commitAndCloseSession() throws BusinessException;

	/**
	 * 回滚事务并关闭数据库连接Session
	 *
	 * @throws BusinessException
	 */
	public abstract void rollbackAndCloseSession() throws BusinessException;

	/**
	 * 实例化一个空的领域对象，即new一个领域Object。用于新建一个领域对象
	 *
	 * @throws BusinessException
	 */
	public abstract Object newEmptyDomainObj() throws BusinessException;

}